[% setvar title Remove mathematic and trigonomic functions from core binary %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='TITLE'></a><h1>TITLE</h1>
<p>Remove mathematic and trigonomic functions from core binary</p>
<a name='VERSION'></a><h1>VERSION</h1>
<pre>  Maintainer: Stephen P. Potter &lt;<a href='mailto:spp@ds.net'>spp@ds.net</a>&gt;
  Date: 24 Aug 2000
  Last Modified: 28 Aug 2000
  Mailing List: <a href='mailto:perl6-internals@perl.org'>perl6-internals@perl.org</a>
  Number: 155
  Version: 2
  Status: Developing</pre>
<a name='ABSTRACT'></a><h1>ABSTRACT</h1>
<p>Move the mathematic functions (<code>exp</code>, <code>log</code>, <code>sqrt</code>) from the core
binary into a loadable module.  Remove the trigonomic (<code>atan2</code>, <code>cos</code>,
<code>sin</code>) functions from the binary, they can already be loaded from the
Math::Trig.pm module.</p>
<a name='DESCRIPTION'></a><h1>DESCRIPTION</h1>
<p>It is desirable to make the perl core binary be easy to maintain and
parse.  It is further desirable to make it easy for parts of the language
to be unimplemented on future ports (such as for embedded systems).  Moving
as many of the special purpose functions to loadable modules serves these
goals well.</p>
<p>There are very few mathematic functions currently in the core binary.
These appear to have been mostly chosen only because they were either easy
to implement or they had been included in other languages that perl was
designed to &quot;replace&quot;.  It would be worthwhile to move these functions to
a loadable module (<code>Math.pm</code>).  Moving these functions to a module also
allows ease of adding other functions to these categories.  The specific
functions that would move to the <code>Math.pm</code> module are:</p>
<ul>
<li><a name=''></a></li>
<p><code>exp</code></p>
<li><a name=''></a></li>
<p><code>log</code></p>
<li><a name=''></a></li>
<p><code>sqrt</code></p>
</ul>
<p>The trigonomic functions currently included in the core binary are of
generally limited and specific value.  This RFC is further proposing that all
trigonomic functions should move to a Math::Trig.pm module.  In general,
those functions are already there, this proposal would have them removed from
the core binary.</p>
<p>The specific functions that would be covered under this proposal are:</p>
<ul>
<li><a name=''></a></li>
<p><code>atan2</code></p>
<li><a name=''></a></li>
<p><code>cos</code></p>
<li><a name=''></a></li>
<p><code>sin</code></p>
</ul>
<a name='IMPLEMENTATION'></a><h1>IMPLEMENTATION</h1>
<p>Creation of <code>Math.pm</code> module for the listed math functions.  Other useful
functions can also be added to this module.  Removal of mathematic and
trigonomic functions from core binary.  It is recommended that they be
defined to require <code>use Math;</code> or <code>use Math::Trig</code>, but it should be
acceptible for them to autoload.</p>
<a name='REFERENCES'></a><h1>REFERENCES</h1>
<p><i><a href='http://search.cpan.org/perldoc?perlfunc'>perlfunc</a></i></p>
<a name='CHANGES'></a><h1>CHANGES</h1>
<p>Version 1 of this RFC included a brain-drain on the category of the functions.
They are trigonomic, not geometric.</p>
<p>Version 1 of this RFC lumped all mathematic functions into one category.
This version breaks them into two categories.</p>
<p>Inclusion of more reasoning.</p>
</div>
